package oldmodifiers;

import java.util.List;

import inputs.Input;

public class Sum extends Modifier implements Runnable{
	
	boolean running;
	public Sum(List<Input> inputs)
	{
		//super(inputs);
		this.running = false;
	}
	
	protected void Update()
	{
		if (!running)
			value = 0;
		for (Input input : inputs)
		{
			value += input.getValue();
		}
	}
	
	protected void AccountForInputs()
	{
		min = 0;
		max = 0;
		for (Input input : inputs)
		{
			min += input.getMin();
			max += input.getMax();
		}
	}

	public boolean getRun()
	{
		return running;
	}

	public void setRun(boolean run)
	{
		this.running = run;
	}	
}
